<template>
  <div class="container">
    <div class="tabsNew">
      <el-tabs v-model="activeName" @tab-click="handleClick" class="weightTabs">
        <el-tab-pane label="客运" name="ky" :lazy="true">
          <subOne v-if="activeName == 'ky'" :groupparams="2" :genre="1"></subOne>
        </el-tab-pane>
        <el-tab-pane label="货运" name="hy" :lazy="true">
          <subOne v-if="activeName == 'hy'" :groupparams="2" :genre="2"></subOne>
        </el-tab-pane>
        <el-tab-pane label="危险品" name="wxp" :lazy="true">
          <subOne v-if="activeName == 'wxp'" :groupparams="2" :genre="3"></subOne>
        </el-tab-pane>
        <el-tab-pane label="教练员" name="jly" :lazy="true">
          <subOne v-if="activeName == 'jly'" :groupparams="2" :genre="4"></subOne>
        </el-tab-pane>
        <el-tab-pane label="出租车" name="czc" :lazy="true">
          <subOne v-if="activeName == 'czc'" :groupparams="2" :genre="5"></subOne>
        </el-tab-pane>
        <el-tab-pane label="网约车" name="wyc" :lazy="true">
          <subOne v-if="activeName == 'wyc'" :groupparams="2" :genre="6"></subOne>
        </el-tab-pane>
      </el-tabs>
    </div>
  </div>
</template>

<script type="text/javascript">
import subOne from "../subOne";
import subFour from "../subFour";

import checkPermission from "@/utils/permission"; // 权限判断函数
export default {
  data() {
    return {
      activeName: "ky",
    };
  },
  components: {
    subFour,
    subOne,
  },
  methods: {
    checkPermission,
    handleClick(tab, event) {
      this.activeName = tab.name;
    },
  },
};
</script>

<style lang="scss" scoped>
::v-deep {
  .is-active {
    font-weight: bold;
  }
  .weightTabs .el-tabs__item {
    font-size: 16px;
  }
  .el-tabs__header {
    margin: 0;
  }
}
</style>
